<template>
	<view class="listcontent container">
		<view class="contelis">
			<view class="titles">
				博客详情
				<view class="backs" @click="backgs"> <返回</view>
			</view>
			<view class="contents">
				<view class="titlesesa">{{datas.title}}</view>
				<view class="des"><text>发布时间：{{datas.creattime}}</text> <text>作者：某某某</text></view>
			</view>
		    <view class="contensse">
		    	<u-parse :html="datas.content"></u-parse>
		    </view>
		</view>
	</view>
</template>

<script>
	import api from '../../api/api.js';
	import {mapGetters,mapMutations} from 'vuex';
	export default {
		data() {
			return {
				Id:'',
				datas:{}
			}
		},
		computed: {
			...mapGetters(['editedataz'])
		},
		onShow() {
		   
		},
		methods: {
			backgs(){
				uni.navigateTo({
					url:'/pages/index/index'
				})
			},
			autoplays(options){
				const datas = {
					id:options
				}
				api.getbloginfos(datas).then((res)=>{
					console.log(res);
					this.datas = res.data;
				})
			},
		},
		onLoad(options) {
			this.autoplays(options.Id);
		},
	}
</script>

<style>
	.des{ width: 100%; display: flex; justify-content: center;align-items: center;}
	.des text{ margin-right: 50px; color: #CCCCCC;}
	.titlesesa{text-align: center; font-size: 18px; width: 100%; height: 50px; line-height: 50px;}
	.listcontent{background: #27ae60; width: 100%; overflow-y:scroll; height: 100vh; ;}
	.contelis{ width: 900px; margin: 0 auto; background-color: #fff; height: 100vh; overflow-y: scroll;}
	.titles{  background-color: #ccc; height: 150px; line-height: 150px;text-align: center; font-size: 20px; position: relative;}
	.backs{ position: absolute; left: 50px; top: 20px; font-size: 18px; height: 30px; line-height: 30px;}
	.addblog{ background-color: #eee; width:100%; min-height: 200px;}
	#editor {width: 100%;height: 300px;background-color: #CCCCCC;}
	.wrapper {
		height: 100%;
	}
	
	.editor-wrapper {
		height: calc(100vh - var(--window-top) - var(--status-bar-height) - 140px);
		background: #fff;
	}
	
	.iconfont {
		display: inline-block;
		padding: 8px 8px;
		width: 24px;
		height: 24px;
		cursor: pointer;
		font-size: 20px;
	}
	
	.toolbar {
		box-sizing: border-box;
		border-bottom: 0;
		font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
	}
	
	
	.ql-container {
		box-sizing: border-box;
		padding: 12px 15px;
		width: 100%;
		min-height: 30vh;
		height: 100%;
		margin-top: 20px;
		font-size: 16px;
		line-height: 1.5;
	}
	
	.ql-active {
		color: #06c;
	}
    .titleses{ display: flex; align-items: center; height: 50px; line-height: 50px; font-size: 16px;}
	.butos{ display: flex; padding: 30px 0;}
	.contents{width: 100%; padding: 15px;}
	.contensse{ padding: 50px;}
</style>
